<template>
<h3>事件修饰符</h3>
<a @click="clickHandle" href="https://itbaizhan.com">百战程序员</a>
<div @click="clickDiv">
    <p @click="clickP">测试冒泡</p>
</div>

</template>
<script>
export default{
    data(){
        return{

        }
    },
    methods:{
        clickHandle(e){
            //阻止默认事件
            // e.preventDefault();
            console.log("点击了");
        },
        clickDiv(){
            console.log("Div");
        },
        clickP(e){
            // e.stopPropagation();//阻止父div
            console.log("P");
        }
    }
}

</script>